# EMC controller parameters for a simulated machine.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.

# General section -------------------------------------------------------------
[EMC]
VERSION = 1.0
MACHINE = gscreen
DEBUG = 0

# Sections for display options ------------------------------------------------
[DISPLAY]
# required NativeCAM item :
NCAM_DIR = ncam

# required NativeCAM item :
PROGRAM_PREFIX = /home/fernand/linuxcnc/nc_files

# required NativeCAM item :
EMBED_TAB_NAME = NativeCAM

# required NativeCAM item :
EMBED_TAB_LOCATION = vcp_box

# required NativeCAM item :
EMBED_TAB_COMMAND = gladevcp -x {XID} -U --catalog=plasma ncam.ui

DISPLAY = gscreen

# Cycle time, in milliseconds, that display will sleep between polls
CYCLE_TIME =            100

# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE =     1.5
MAX_SPINDLE_OVERRIDE =  1.2
MIN_SPINDLE_OVERRIDE = .5

# Max and default jog speeds in units per second
MAX_LINEAR_VELOCITY =   166
DEFAULT_LINEAR_VELOCITY = 5
MAX_ANGULAR_VELOCITY = 234

# Prefix to be used
#PROGRAM_PREFIX = /home/fernand/linuxcnc/nc_files

# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5

# list of selectable jog increments
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in

# for details see nc_files/subroutines/maco_instructions.txt

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

# Task controller section -----------------------------------------------------

[RS274NGC]
# required NativeCAM item :
SUBROUTINE_PATH = ncam/my-stuff:ncam/lib/plasma:ncam/lib/utilities

PARAMETER_FILE = plasma-mm.var
#RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
#PARAMETER_FILE = sim.var

# Motion control section ------------------------------------------------------

[EMCMOT]
EMCMOT =              motmod
COMM_TIMEOUT =          1.0
COMM_WAIT =             0.010
BASE_PERIOD  =          100000
SERVO_PERIOD =          1000000

# Hardware Abstraction Layer section --------------------------------------------------

[TASK]
TASK =                  milltask
CYCLE_TIME =            0.001

# Part program interpreter section --------------------------------------------

[HAL]
HALFILE = core_sim.hal
#HALFILE = spindle_sim.hal
HALFILE = simulated_home.hal

# Single file that is executed after the GUI has started.
#POSTGUI_HALFILE = gmoccapy_postgui.hal

HALUI = halui

# Trajectory planner section --------------------------------------------------

[HALUI]
#No Content
[TRAJ]

AXES =             3
COORDINATES =      X Y Z 
HOME =             0 0 0
LINEAR_UNITS =     mm
ANGULAR_UNITS =    degree
CYCLE_TIME =       0.010
DEFAULT_LINEAR_VELOCITY = 900
MAX_LINEAR_VELOCITY =     1000

# not needed in demo
#POSITION_FILE =    plasma-mm.pos
#NO_FORCE_HOMING = 1

[EMCIO]
TOOL_TABLE = plasma_mm.tbl
EMCIO      = io
CYCLE_TIME = 0.100
# not needed for plasma
#TOOL_CHANGE_POSITION = 0 0 350
#TOOL_CHANGE_QUILL_UP = 1

[KINS]
KINEMATICS = trivkins
JOINTS = 3

[AXIS_X]
MIN_LIMIT = -1000.0
MAX_LIMIT = 1000.0
MAX_VELOCITY = 600
MAX_ACCELERATION = 1500.0

[JOINT_0]
TYPE =                          LINEAR
HOME =                          0.000
MAX_VELOCITY =                  600
MAX_ACCELERATION =              1500.0
BACKLASH = 0.000
INPUT_SCALE =                   4000
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -1000.0
MAX_LIMIT =                     1000.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 20
HOME_SEARCH_VEL =                200.0
HOME_LATCH_VEL =                 20.0
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 1
HOME_IS_SHARED = 1

[AXIS_Y]
MIN_LIMIT = -1000.0
MAX_LIMIT = 1000.0
MAX_VELOCITY = 600
MAX_ACCELERATION = 1500.0

[JOINT_1]
TYPE =                          LINEAR
HOME =                          0.000
MAX_VELOCITY =                  600
MAX_ACCELERATION =              1500.0
BACKLASH = 0.000
INPUT_SCALE =                   4000
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -1000.0
MAX_LIMIT =                     1000.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET = 20
HOME_SEARCH_VEL =                200.0
HOME_LATCH_VEL =                 20.0
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 1

[AXIS_Z]
MIN_LIMIT = -400.0
MAX_LIMIT = 400.0
MAX_VELOCITY = 600
MAX_ACCELERATION = 1500.0

[JOINT_2]
TYPE =                          LINEAR
HOME =                          0.0
MAX_VELOCITY =                  600
MAX_ACCELERATION =              1500.0
BACKLASH = 0.000
INPUT_SCALE =                   4000
OUTPUT_SCALE = 1.000
MIN_LIMIT =                     -400.0
MAX_LIMIT =                     400.0
FERROR = 0.050
MIN_FERROR = 0.010
HOME_OFFSET =                    20
HOME_SEARCH_VEL =                200.0
HOME_LATCH_VEL =                 20.0
HOME_USE_INDEX =                 NO
HOME_IGNORE_LIMITS =             NO
HOME_SEQUENCE = 0
HOME_IS_SHARED = 1
